import { ConfigEnum, MicroServiceEnum } from '@/common/enums/httpEnum'
const Url = {
  addShare: '/app/shareAdd',
  agreement: '/agreements/display',
  ifPopup: `/api/survey-questionnaire/popup`,
}

/**
 * @description: 请求示例
 */
export const getAppInfo = (params) => uni.$uv.http.post(Url.addShare, params)

/**
 * @description: 获取隐私协议
 */
export const getAgreementInfo = (params = { agreement_type: 'by_privacy_agreement_pop' }) => uni.$uv.http.get(Url.agreement, { params })

//是否弹出问卷
export const ifPopup = (params) =>
  uni.$uv.http.get(Url.ifPopup, { params, header: { [ConfigEnum.MICRO_SERVICE_PLATFORM]: MicroServiceEnum.GATEWAY, authorization: 'szct' }, custom: { showLoading: true } })
